import numpy as np
x = np.array([0, 1])     # 输入
w = np.array([0.5, 0.5]) # 权重
b = -0.7                 # 偏置

print(x * w)         # x 与 w 对应项相乘
print(sum(x * w))    # x 与 w 对应项相乘后求和
print(sum(x * w) + b)# x 与 w 对应项相乘后求和，再加偏置值